var app = getApp();
var com = require('../../common.js');
Page({
  data: { path:''},
  onLoad: function(options) {
    var _this = this
    _this.onShopStatus()
  },
  //获取信息
  onShopStatus() {
    var _this = this,
      i = _this.data.information
    com.link(app.link.onPowerState + wx.getStorageSync('store') + '.st', {
      code: 'meituan'
    }, function(res) {
      console.log(res)
      if (res.data.response.entrust) {
        _this.setData({
          y: res.data.response.entrust.create_time.substring(0, 4),
          m: res.data.response.entrust.create_time.substring(5, 7),
          d: res.data.response.entrust.create_time.substring(8, 10),
        })
      }
      _this.setData({
        state: res.data.response.entrust
      })
      _this.onSaveZhang()
    }, "GET")
  },
  //获取盖章
  onSaveZhang(){
    var _this = this
    com.link(app.link.onGetTheSeal + wx.getStorageSync('store') + '.st', {}, function (res) {
      console.log(res)
      _this.setData({
        path:res.data.response.path
      })
    },"GET")
  },
  onReady: function() {},
  onShow: function() {},
  onHide: function() {},
  onUnload: function() {},
  onPullDownRefresh: function() {},
  onReachBottom: function() {},
  onShareAppMessage: function() {},
})